﻿<?php
require("conexao.php");
require("php2/functions.php");

	if (!isset($_SESSION["user"]["LOGIN"]) and !isset($_SESSION["user"]["SENHA"]))
	{
print "<script type= 'text/javascript'> location.href = 'index2.php?link=7'</script>";
	}
	
	$id = $_SESSION["user"]["ID"];
	
	$time = getdate();
	$data_atual = "$time[year]/$time[mon]/$time[mday]";
	$inicio_mes = "$time[year]/$time[mon]/1";
?>

<link rel="stylesheet" type="text/css" href="resources/css/estilo.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript" src="js/javascript.js"></script>
<!--<link href="resources/css/default.css" rel="stylesheet" type="text/css"/>-->
<link href="resources/css/jquery.click-calendario-1.0.css" rel="stylesheet" type="text/css"/> 
<link type="text/css" href="resources/css/jquery-ui-1.8.16.custom.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.click-calendario-1.0-min.js"></script>		
<script type="text/javascript" src="js/exemplo-calendario.js"></script>
<!-- DataTables -->
<script src="js/jquery.DataTables.min.js" type="text/javascript"></script>
<script src="js/jquery.jeditable.js" type="text/javascript"></script>
<script src="js/jquery.jpaging.js" type="text/javascript"></script>
<script src="js/jquery-ui.js" type="text/javascript"></script>
<script src="js/jquery.validate.js" type="text/javascript"></script>
<script src="js/jquery.DataTables.editable.js" type="text/javascript"></script>
<!-- DataTables -->
<script type="text/javascript">
$(document).ready(function(){
	/*$("#filtro").click(function(){
		var datai = document.getElementById('data_1');
		var	dataf = document.getElementById('data_2');
		if (datai != "")
		{	
			$("#dvtabelaE").load('php2/cTable.php', data: {datai : datai, dataf: dataf});
		}else {
			alert('Escolha uma data');
		}
	});*/
	
		$("#tbextrato").dataTable({
        "oLanguage": {
            "sLengthMenu": "Mostrar _MENU_ linhas por página",
            "sZeroRecords": "Nenhum dado encontrado",
            "sInfo": "Mostrando _START_ a _END_ de _TOTAL_ linhas",
            "sInfoEmpty": "Mostrando 0 a 0 de 0 linhas",
            "sInfoFiltered": "( de um total de _MAX_ linhas)",
			"sEmptyTable": "Nenhum dado a ser mostrado",
			"sSearch": "Buscar:"
        }
			}).makeEditable({
					sUpdateURL: "php2/UpdateData2.php"
				});
	

});
</script>

<body>
<div class="global-div">


<ul class="abas">
    <li><a href="#noticia1">Contas</a></li>
</ul>

<div id="ajuda">
<a href="#"><img src="imagens/ajuda.png" width="30" height="30" onClick="$('#two').jGrowl('Nesta tela você porá realizar sua conciliação bancária.');"  border="0" value="Bottom Left"/></a>
<div id="two" class="jGrowl bottom-left"></div>
</div>


<div id="noticia"></div>

<div id="conteudo">

    <div id="noticia1">
 
    <p>Escolha uma data: <input type="text" name="data_1" id="data_1" size="10" maxlength="10"/>
					-
				    <input type="text" name="data_2" id="data_2" size="10" maxlength="10"/>
					<button type="button" id="filtro">Buscar</button>
    </p>
	<div id="dvtabelaE" class="ui-widget ui-widget-content">
    <?php cTabelaE("", "", "2") ?>
    </div>
    <a href="index2.php?link=3"> <button type="button"  id="adicionar" >Adicionar</button> </a>	
    
    <form id="form1" method="post" action="">
       <p>
        
       </p>
      </form> 
     <blockquote>
       <p>&nbsp;</p>
    </blockquote>
    </div>
    </div> 
</div>
</div>
</body>
